package a.j;

import a.c.ab;
import a.c.bb;
import a.c.d;
import a.c.m;
import a.c.q;
import a.c.z;
import a.d.v;
import a.f.bc;
import a.f.fc;
import a.f.i.a;
import a.f.l.f;
import a.f.l.l;
import a.f.rc;
import a.f.vb;
import a.f.xb;
import a.i.p;
import a.j.a.j;

import java.util.*;

import a.d.v;
import a.i.p;

class wc
{
  private lc.z_ a;
  private static final double b = 1.0E-012D;
  static final Object c = "STRAIGHT_LINE";
  static final Object e = "ORTHOGONAL";
  static final Object f = "PARAXIAL";
  static final Object h = "MARKED_INTER_EDGES";
  static final Object i = "ORTHOGONAL_INTER_EDGES";
  static final int j = 5;
  static final double k = 0.1D;
  
  wc(lc.z_ paramz_)
  {
    this.a = paramz_;
  }
  
  void a(g paramg)
  {
    boolean bool = ld.E;
    bb localbb = new bb();
    ab localab = new ab();
    HashMap localHashMap1 = new HashMap();
    HashMap localHashMap2 = new HashMap();
    this.a.a(paramg, localbb, localab, localHashMap1, localHashMap2);
    if (!bool) {
      if ((localbb.isEmpty()) && ((bool) || (localab.isEmpty())))
      {
        z localz1 = new z();
        z localz2 = new z();
        HashMap localHashMap3 = new HashMap();
        HashMap localHashMap4 = new HashMap();
        this.a.a(paramg, localz1, localz2, localHashMap3, localHashMap4);
        this.a.b(paramg, localz1, localz2, localHashMap3, localHashMap4);
        this.a.c(paramg, localz1, localz2, localHashMap3, localHashMap4);
        if (!bool) {
          if (!ld.D) {
            return;
          }
        }
      }
      else
      {
        this.a.b(paramg, localbb, localab, localHashMap1, localHashMap2);
      }
    }
    this.a.c(paramg, localbb, localab, localHashMap1, localHashMap2);
  }
  
  void a(g paramg, bb parambb, ab paramab, Map paramMap1, Map paramMap2)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    bb localbb = this.a.a(paramg);
    if (!bool2) {
      if (!localbb.isEmpty())
      {
        localObject1 = paramg.B();
        localObject2 = b.a(paramg, localbb, false, (a.c.x)localObject1, 2);
        if ((bool2) || (localObject2.length > 1))
        {
          localObject3 = localObject2[1];
          if (bool2) {
            break label117;
          }
          if (!bool1) {}
        }
        else
        {
          localObject3 = new bb();
        }
        a(paramg, localbb, (bb)localObject3, new ab(paramg.w()), false, parambb, paramab, paramMap1, paramMap2);
        if (!bool1) {
          label117:
          return;
        }
      }
    }
    Object localObject1 = new bb();
    Object localObject2 = this.a.b(paramg);
    Object localObject3 = ((ab)localObject2).l();
    do
    {
      if (!((m)localObject3).e()) {
        break;
      }
      d locald = ((m)localObject3).a();
      ((bb)localObject1).add(locald.e());
      ((bb)localObject1).add(locald.f());
      ((m)localObject3).f();
      if ((!bool2) && (bool1)) {
        return;
      }
    } while (!bool1);
    if (!bool2) {
      a(paramg, new bb(), (bb)localObject1, (ab)localObject2, true, new bb(), paramab, paramMap1, paramMap2);
    }
  }
  
  bb b(g paramg)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    bb localbb = new bb();
    a.c.w localw = paramg.v();
    do
    {
      if (!localw.e()) {
        break;
      }
      a.c.e locale = localw.d();
      if (!bool2)
      {
        if (paramg.y(locale)) {
          localbb.add(locale);
        }
        localw.f();
      }
    } while (!bool1);
    return localbb;
  }
  
  ab d(g paramg)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    ab localab = new ab();
    m localm = paramg.w();
    do
    {
      if (!localm.e()) {
        break;
      }
      d locald = localm.a();
      if (!bool2)
      {
        if (paramg.v(locald)) {
          localab.add(locald);
        }
        localm.f();
      }
    } while (!bool1);
    return localab;
  }
  
  void c(g paramg, bb parambb, ab paramab, Map paramMap1, Map paramMap2)
  {
    boolean bool = ld.E;
    if (!bool)
    {
      if (parambb.isEmpty())
      {
        a(paramg, paramab, paramMap2, 20.0D, 20.0D);
        if (bool) {
          break label56;
        }
      }
    }
    else if (!ld.D) {
      return;
    }
    a(paramg, parambb, paramab, paramMap2);
    a(paramg, parambb);
    label56:
    paramg.j(h);
  }
  
  void a(g paramg, bb parambb, ab paramab, Map paramMap)
  {
    boolean bool3 = ld.E;
    boolean bool2 = ld.D;
    HashSet localHashSet = new HashSet(parambb);
    a.c.n localn = a.i.db.b();
    ab localab = new ab();
    m localm = paramab.l();
    Object localObject1;
    label147:
    Object localObject2;
    label181:
    do
    {
      if (!localm.e()) {
        break;
      }
      localObject1 = localm.a();
      if (bool2) {
        break label203;
      }
      if (localHashSet.contains(((d)localObject1).e()))
      {
        if (bool3) {
          break label147;
        }
        if (!localHashSet.contains(((d)localObject1).f())) {}
      }
      else
      {
        if (bool3) {
          continue;
        }
        if (localHashSet.contains(((d)localObject1).e())) {
          break label181;
        }
        if (bool3) {
          continue;
        }
        if (!localHashSet.contains(((d)localObject1).f())) {
          break label181;
        }
      }
      localObject2 = a(paramg, (d)paramMap.get(localObject1));
      localn.a(localObject1, localObject2);
      if (!bool3)
      {
        if (localObject2 == f) {
          localab.add(localObject1);
        }
        localm.f();
      }
    } while (!bool2);
    if (!bool3)
    {
      if (!localab.isEmpty())
      {
        label203:
        boolean bool1 = a.f.wc.b(paramg, new p()
        {
          private final HashSet val$isNewNode;
          
          public boolean getBool(Object paramAnonymousObject)
          {
            boolean bool = ld.E;
            d locald = (d)paramAnonymousObject;
            if ((bool) || (!this.val$isNewNode.contains(locald.e()))) {
              if (bool) {}
            }
            return !this.val$isNewNode.contains(locald.f());
          }
        });
        localObject1 = bool1 ? e : c;
        localObject2 = localab.l();
        do
        {
          if (!((m)localObject2).e()) {
            break;
          }
          localn.a(((m)localObject2).a(), localObject1);
          ((m)localObject2).f();
          if ((!bool3) && (bool2)) {
            return;
          }
        } while (!bool2);
      }
      if (bool3) {}
    }
    else
    {
      paramg.a(h, localn);
    }
  }
  
  static Object a(g paramg, d paramd)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    int m = 0;
    int n = 0;
    v localv = paramg.n(paramd).l();
    label137:
    do
    {
      if (!localv.e()) {
        break;
      }
      a.d.n localn = localv.a();
      a.d.w localw1 = localn.d();
      a.d.w localw2 = localn.e();
      if (bool1) {
        break label155;
      }
      if (Math.abs(localw1.a() - localw2.a()) < 1.0E-012D)
      {
        n = 1;
        if (bool2) {
          continue;
        }
        if (!bool1) {}
      }
      else
      {
        if (!bool2) {
          if (Math.abs(localw1.b() - localw2.b()) < 1.0E-012D)
          {
            m = 1;
            if (bool2) {
              continue;
            }
            if (!bool1) {
              break label137;
            }
          }
        }
        return c;
      }
      localv.f();
    } while (!bool1);
    label155:
    if ((!bool2) && (m != 0)) {}
    return n != 0 ? e : f;
  }
  
  void a(g paramg, bb parambb, ab paramab)
  {
    boolean bool = ld.E;
    if (!bool)
    {
      paramg.V();
      if (parambb.isEmpty())
      {
        if (!bool)
        {
          if (paramab.isEmpty()) {
            return;
          }
          if (bool) {
            break label54;
          }
          paramg.a(paramab.l(), true);
        }
        if (!ld.D) {
          return;
        }
      }
    }
    label54:
    paramg.a(parambb.l(), true);
  }
  
  private void a(g paramg, bb parambb1, bb parambb2, ab paramab1, boolean paramBoolean, bb parambb3, ab paramab2, Map paramMap1, Map paramMap2)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    HashSet localHashSet = new HashSet(parambb1);
    bb localbb1 = new bb(parambb1);
    localbb1.addAll(parambb2);
    HashMap localHashMap = new HashMap();
    ab localab = new ab();
    Object localObject1 = paramg.e();
    localObject1 = new b_((x.a_)localObject1, localab, paramMap1, localHashMap, paramMap2);
    dc.a_ locala_ = new dc.a_((x.a_)localObject1);
    a.i.x localx = new a.i.x();
    localx.a(locala_);
    locala_.a(localx);
    bb localbb2 = localx.a(paramg, localbb1.l(), paramab1.l(), paramg);
    a.c.w localw = localbb2.l();
    label515:
    do
    {
      if (!localw.e()) {
        break;
      }
      a.c.e locale1 = localw.d();
      a.c.e locale2 = (a.c.e)paramMap1.get(locale1);
      if (bool2) {
        return;
      }
      if (bool1) {
        break label654;
      }
      Object localObject2;
      Object localObject3;
      a.c.e locale3;
      if (!localHashSet.contains(locale2))
      {
        localObject2 = (a.c.e)paramMap1.get(locale1);
        localObject3 = new ab(locale1.l()).l();
        do
        {
          do
          {
            if (!((m)localObject3).e()) {
              break label515;
            }
            locale3 = ((m)localObject3).a().a(locale1);
            a.c.e locale4 = (a.c.e)paramMap1.get(locale3);
            if (bool1) {
              break;
            }
            if (!paramBoolean)
            {
              if (bool2) {
                continue;
              }
              if (!localHashSet.contains(locale4)) {}
            }
            else
            {
              d locald = ((m)localObject3).a();
              j localj;
              a.c.e locale5;
              a.c.e locale6;
              if (!bool2)
              {
                if (locald.e() == locale3)
                {
                  paramg.a(locald, locale3, (a.c.e)localObject2);
                  localj = paramg.K();
                  if (bool2) {
                    continue;
                  }
                  if (localj != null)
                  {
                    if (bool2) {
                      continue;
                    }
                    if (paramg.K().e(locald))
                    {
                      locale5 = localj.c(locald);
                      locale6 = localj.b(locald);
                      localj.a(locald);
                      localj.b(locald, locale6, (a.c.e)paramMap1.get(locale5));
                      if (bool2) {
                        continue;
                      }
                      if (!bool1) {}
                    }
                  }
                }
                else
                {
                  paramg.a(locald, (a.c.e)localObject2, locale3);
                }
              }
              else
              {
                localj = paramg.K();
                if (bool2) {
                  continue;
                }
                if (localj != null)
                {
                  if (bool2) {
                    continue;
                  }
                  if (paramg.K().e(locald))
                  {
                    locale5 = localj.c(locald);
                    locale6 = localj.b(locald);
                    localj.a(locald);
                    localj.b(locald, (a.c.e)paramMap1.get(locale6), locale5);
                  }
                }
              }
            }
            ((m)localObject3).f();
          } while (!bool1);
          locale1.g().a(locale1);
        } while (bool2);
        if (bool2) {
          continue;
        }
        if (!bool1) {}
      }
      else
      {
        parambb3.add(locale1);
        localObject2 = paramg.K();
        if (bool2) {
          continue;
        }
        if (localObject2 != null)
        {
          localObject3 = ((j)localObject2).p(locale2);
          if ((bool2) || (localHashSet.contains(localObject3)))
          {
            locale3 = (a.c.e)localHashMap.get(localObject3);
            ((j)localObject2).c(locale1, locale3);
            if (bool2) {
              continue;
            }
            if (!bool1) {}
          }
          else
          {
            ((j)localObject2).c(locale1, (a.c.e)localObject3);
          }
        }
      }
      localw.f();
    } while (!bool1);
    if (!bool2) {
      label654:
      paramab2.addAll(localab);
    }
  }
  
  void a(g paramg, ab paramab, Map paramMap, double paramDouble1, double paramDouble2)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    a.c.n localn = a.i.db.b();
    Object localObject1 = paramab.l();
    Object localObject2;
    do
    {
      if (!((m)localObject1).e()) {
        break;
      }
      localObject2 = ((m)localObject1).a();
      if ((!bool2) && (bool1)) {
        break label230;
      }
      if (((!bool2) && ((((d)localObject2).g()) && (bool2))) || (paramg.t((d)localObject2).n() <= 1))
      {
        tb localtb = paramg.t((d)localObject2);
        ld localld = localtb.h();
        if (!bool2)
        {
          if (paramg.t((d)localObject2).n() == 0) {
            localtb.c(localtb.k().a(localld), localtb.k().b(localld) - 20.0D - localld.d());
          }
          a(paramg, paramDouble1, paramDouble2, (d)localObject2, true, false, false, ((d)localObject2).e());
        }
        if (bool2) {
          continue;
        }
        if (!bool1) {}
      }
      else
      {
        localn.a(localObject2, true);
        localn.a(paramMap.get(localObject2), true);
      }
      ((m)localObject1).f();
    } while (!bool1);
    if (!bool2) {
      paramg.a(a.f.db.h, localn);
    }
    label230:
    localObject1 = new a.f.db();
    ((a.f.db)localObject1).a(5.0D);
    ((a.f.db)localObject1).d(false);
    ((a.f.db)localObject1).b(true);
    try
    {
      localObject2 = new ec((byte)1);
      ((ec)localObject2).g(false);
      ((ec)localObject2).h(true);
      ((ec)localObject2).d().a(true);
      ((ec)localObject2).a(paramg, (rc)localObject1);
    }
    finally
    {
      paramg.j(a.f.db.h);
    }
  }
  
  static void a(g paramg, bb parambb)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    a.c.x localx = paramg.B();
    a.c.w localw = parambb.l();
    do
    {
      if (!localw.e()) {
        break;
      }
      localObject1 = localw.d();
      if (bool2) {
        break label87;
      }
      localx.a(localObject1, true);
      localw.f();
      if (bool1) {
        break label80;
      }
    } while (!bool1);
    if (!bool2) {
      paramg.a(a.g, localx);
    }
    label80:
    label87:
    int m = paramg.c(h) != null ? 1 : 0;
    Object localObject1 = new a();
    ((a)localObject1).b((byte)3);
    Object localObject2;
    if (!bool2)
    {
      ((a)localObject1).a((byte)2);
      if (m != 0)
      {
        localObject2 = new a.f.l.g();
        ((a.f.l.g)localObject2).b((byte)2);
        ((a.f.l.g)localObject2).b(i);
        ((a.f.l.g)localObject2).f(true);
        ((a.f.l.g)localObject2).d(4);
        ((a.f.l.g)localObject2).e(false);
        ((a.f.l.g)localObject2).c(5);
        ((a.f.l.g)localObject2).c(true);
        ((a.f.l.g)localObject2).a((byte)1);
        ((a.f.l.g)localObject2).b(true);
        ((a.f.l.g)localObject2).c((byte)1);
        ((a.f.l.g)localObject2).a("routingPreferMiddleOfNode", Boolean.TRUE);
        a.f.l.e locale = new a.f.l.e(new f(new l(new a.f.l.k((rc)localObject2))));
        ((a)localObject1).b(new rc()
        {
          private final a.f.l.e val$router;
          
          public boolean canLayout(a.f.o paramAnonymouso)
          {
            return true;
          }
          
          public void doLayout(a.f.o paramAnonymouso)
          {
            boolean bool2 = ld.E;
            boolean bool1 = ld.D;
            a.c.k localk = paramAnonymouso.c(wc.h);
            paramAnonymouso.a(wc.i, new wc.3(this, localk));
            this.val$router.doLayout(paramAnonymouso);
            paramAnonymouso.j(wc.i);
            m localm = paramAnonymouso.w();
            do
            {
              if (!localm.e()) {
                break;
              }
              d locald = localm.a();
              if (!bool2)
              {
                if (localk.get(locald) == wc.c) {
                  a.f.wc.b(paramAnonymouso, locald);
                }
                localm.f();
              }
            } while (!bool1);
          }
        });
        if (bool2) {
          break label288;
        }
        if (!bool1) {
          break label270;
        }
      }
    }
    ((a)localObject1).c((byte)2);
    label270:
    ((a)localObject1).d((byte)5);
    ((a)localObject1).d(true);
    ((a)localObject1).f(false);
    try
    {
      label288:
      localObject2 = new ec((byte)1);
      ((ec)localObject2).g(false);
      ((ec)localObject2).h(true);
      ((ec)localObject2).d().a(true);
      ((ec)localObject2).a(paramg, (rc)localObject1);
    }
    finally
    {
      paramg.j(a.g);
      paramg.a(localx);
    }
  }
  
  void a(g paramg, ab paramab, Map paramMap1, Map paramMap2, double paramDouble1, double paramDouble2)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    m localm = new ab(paramab).l();
    label179:
    label503:
    do
    {
      if (!localm.e()) {
        break;
      }
      d locald = localm.a();
      a.c.e locale;
      if (!bool2) {
        if (paramMap2.containsKey(locald.e()))
        {
          if (bool2) {
            break label291;
          }
          if (!paramMap2.containsKey(locald.f()))
          {
            locale = locald.e();
            if (!bool2) {
              if (a(paramg, locald.a(locale), locald))
              {
                if (bool2) {
                  break label179;
                }
                if (a((d)paramMap1.get(locald)))
                {
                  a(paramg, paramDouble1, paramDouble2, locald, true, true, false, locald.a(locale));
                  if (bool2) {
                    continue;
                  }
                  if (!bool1) {
                    break label539;
                  }
                }
              }
            }
            if (!bool2)
            {
              if (c(paramg, locald.a(locale), locald))
              {
                if (bool2) {
                  break label271;
                }
                if (a((d)paramMap1.get(locald)))
                {
                  a(paramg, paramDouble1, paramDouble2, locald, true, false, true, locald.a(locale));
                  if (bool2) {
                    continue;
                  }
                  if (!bool1) {
                    break label539;
                  }
                }
              }
              locale = locald.e();
              a(paramg, paramDouble1, paramDouble2, locald, true, false, false, locald.a(locale));
            }
            if (bool2) {
              continue;
            }
            if (!bool1) {
              break label539;
            }
          }
        }
      }
      if ((bool2) || ((!paramMap2.containsKey(locald.e())) && (paramMap2.containsKey(locald.f()))))
      {
        locale = locald.f();
        if (!bool2) {
          if (a(paramg, locald.a(locale), locald))
          {
            if (bool2) {
              break label411;
            }
            if (a((d)paramMap1.get(locald)))
            {
              a(paramg, paramDouble1, paramDouble2, locald, true, true, false, locald.a(locale));
              if (bool2) {
                continue;
              }
              if (!bool1) {
                break label539;
              }
            }
          }
        }
        if (!bool2)
        {
          if (c(paramg, locald.a(locale), locald))
          {
            if (bool2) {
              break label503;
            }
            if (a((d)paramMap1.get(locald)))
            {
              a(paramg, paramDouble1, paramDouble2, locald, true, false, true, locald.a(locale));
              if (bool2) {
                continue;
              }
              if (!bool1) {
                break label539;
              }
            }
          }
          locale = locald.e();
          a(paramg, paramDouble1, paramDouble2, locald, true, false, false, locald.a(locale));
        }
        if (bool2) {
          continue;
        }
        if (!bool1) {}
      }
      else
      {
        locale = locald.e();
        a(paramg, paramDouble1, paramDouble2, locald, true, false, false, locald.a(locale));
      }
      localm.f();
    } while (!bool1);
    label271:
    label291:
    return;
  }
  
  void a(g paramg, double paramDouble1, double paramDouble2, d paramd, boolean paramBoolean1, boolean paramBoolean2, boolean paramBoolean3, a.c.e parame)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    tb localtb = paramg.t(paramd);
    if ((bool2) || (localtb.n() > 0))
    {
      int m = 0;
      fb localfb = localtb.o();
      label286:
      label288:
      do
      {
        if (!localfb.e()) {
          break;
        }
        if (!bool2) {
          if ((paramd.e() == parame) && ((bool2) || (m == 0)) && ((bool2) || ((paramBoolean2) || ((bool2) || (paramBoolean3)))))
          {
            if (!bool2) {
              if (paramBoolean2)
              {
                localfb.a().b(0.0D, paramDouble2);
                if (bool2) {
                  break label288;
                }
                if (!bool1) {
                  break label286;
                }
              }
            }
            if (bool2) {
              break label288;
            }
            if (!paramBoolean3) {
              break label286;
            }
            localfb.a().b(paramDouble1, 0.0D);
            if (bool2) {
              break label288;
            }
            if (!bool1) {
              break label286;
            }
          }
        }
        if (paramd.f() == parame) {
          if (((bool2) || (m == localtb.n() - 1)) && ((bool2) || ((paramBoolean2) || ((bool2) || (paramBoolean3)))))
          {
            if (!bool2) {
              if (paramBoolean2)
              {
                localfb.a().b(0.0D, paramDouble2);
                if (bool2) {
                  break label288;
                }
                if (!bool1) {
                  break label286;
                }
              }
            }
            if (bool2) {
              break label288;
            }
            if (!paramBoolean3) {
              break label286;
            }
            localfb.a().b(paramDouble1, 0.0D);
            if (bool2) {
              break label288;
            }
            if (!bool1) {
              break label286;
            }
          }
        }
        localfb.a().b(paramDouble1, paramDouble2);
        if (!bool2)
        {
          if (paramBoolean1) {
            localfb.a().a(true);
          }
          localfb.f();
          m++;
        }
      } while (!bool1);
    }
  }
  
  boolean a(d paramd)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    a.f.o localo = (a.f.o)paramd.c();
    if (!bool2) {
      if ((localo instanceof g))
      {
        localObject = ((g)localo).t(paramd);
        if ((bool2) || (((localObject instanceof ub)) || ((bool2) || (((localObject instanceof zb)) || (((bool2) || (paramd.g())) && ((bool2) || (((tb)localObject).n() == 1))))))) {
          return false;
        }
      }
    }
    Object localObject = localo.n(paramd);
    v localv = ((a.d.y)localObject).l();
    do
    {
      if (!localv.e()) {
        break;
      }
      a.d.w localw1 = localv.a().d();
      a.d.w localw2 = localv.a().e();
      double d1 = localw1.a - localw2.a;
      double d2 = localw1.b - localw2.b;
      if (bool1) {
        break label211;
      }
      if (Math.abs(d1) > 0.5D)
      {
        if (bool2) {
          continue;
        }
        if (Math.abs(d2) > 0.5D) {
          return false;
        }
      }
      localv.f();
    } while (!bool1);
    label211:
    return true;
  }
  
  boolean a(g paramg, a.c.e parame, d paramd)
  {
    boolean bool = ld.E;
    a.d.y localy = paramg.n(paramd);
    if (parame == paramd.e())
    {
      if (bool) {
        break label51;
      }
      localn = localy.a(0);
      if (!ld.D) {
        break label53;
      }
    }
    label51:
    a.d.n localn = localy.a(localy.j() - 2);
    label53:
    a.d.w localw1 = localn.d();
    a.d.w localw2 = localn.e();
    double d1 = localw1.a - localw2.a;
    double d2 = 0.1D;
    if (!bool) {
      if (Math.abs(d1) > -d2)
      {
        if (bool) {
          break label121;
        }
        if (Math.abs(d1) < d2) {
          return true;
        }
      }
    }
    label121:
    return false;
  }
  
  boolean c(g paramg, a.c.e parame, d paramd)
  {
    boolean bool = ld.E;
    a.d.y localy = paramg.n(paramd);
    if (parame == paramd.e())
    {
      if (bool) {
        break label51;
      }
      localn = localy.a(0);
      if (!ld.D) {
        break label53;
      }
    }
    label51:
    a.d.n localn = localy.a(localy.j() - 2);
    label53:
    a.d.w localw1 = localn.d();
    a.d.w localw2 = localn.e();
    double d1 = localw1.b - localw2.b;
    double d2 = 0.1D;
    if (!bool) {
      if (Math.abs(d1) > -d2)
      {
        if (bool) {
          break label121;
        }
        if (Math.abs(d1) < d2) {
          return true;
        }
      }
    }
    label121:
    return false;
  }
  
  void a(g paramg, List paramList1, List paramList2, Map paramMap1, Map paramMap2)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    List localList = this.a.c(paramg);
    Object localObject2;
    Object localObject3;
    Object localObject4;
    label141:
    label143:
    label157:
    Object localObject5;
    if (!bool2) {
      if (!localList.isEmpty())
      {
        localObject1 = new HashSet();
        localObject2 = new bb();
        localObject3 = localList.iterator();
        do
        {
          do
          {
            do
            {
              if (!((Iterator)localObject3).hasNext()) {
                break;
              }
              localObject4 = ((jg)((Iterator)localObject3).next()).gb();
            } while (!((Set)localObject1).add(localObject4));
            if (bool2) {
              break label143;
            }
            ((bb)localObject2).add(localObject4);
            if (bool2) {
              break label157;
            }
            if (bool1) {
              break label141;
            }
          } while (bool2);
        } while (!bool1);
        paramg.a(((bb)localObject2).l());
        localObject3 = localList.iterator();
        do
        {
          if (!((Iterator)localObject3).hasNext()) {
            break;
          }
          localObject4 = (jg)((Iterator)localObject3).next();
          localObject5 = (jg)((jg)localObject4).clone();
          ((jg)localObject4).hb().b((jg)localObject5);
          paramList1.add(localObject5);
          paramMap1.put(localObject5, localObject4);
        } while (!bool1);
      }
    }
    Object localObject1 = this.a.d(paramg);
    if (!((List)localObject1).isEmpty())
    {
      localObject2 = new HashSet();
      localObject3 = new ab();
      localObject4 = ((List)localObject1).iterator();
      do
      {
        do
        {
          do
          {
            if (!((Iterator)localObject4).hasNext()) {
              break;
            }
            localObject5 = ((ig)((Iterator)localObject4).next()).lb();
          } while (((Set)localObject2).contains(localObject5));
          ((Set)localObject2).add(localObject5);
          if (bool2) {
            break label356;
          }
          ((ab)localObject3).add(localObject5);
          if (bool2) {
            break label370;
          }
          if (bool1) {
            break label354;
          }
        } while (bool2);
      } while (!bool1);
      paramg.a(((ab)localObject3).l());
      label354:
      label356:
      localObject4 = ((List)localObject1).iterator();
      label370:
      do
      {
        if (!((Iterator)localObject4).hasNext()) {
          break;
        }
        localObject5 = (ig)((Iterator)localObject4).next();
        ig localig = (ig)((ig)localObject5).clone();
        ((ig)localObject5).nb().a(localig);
        paramList2.add(localig);
        paramMap2.put(localig, localObject5);
      } while (!bool1);
    }
  }
  
  List f(g paramg)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    z localz = new z();
    a.c.w localw = paramg.v();
    label101:
    do
    {
      if (!localw.e()) {
        break;
      }
      a.c.e locale = localw.d();
      ld localld = paramg.w(locale);
      int m = 0;
      do
      {
        do
        {
          if (m >= localld.x()) {
            break label101;
          }
          jg localjg = localld.b(m);
          if (bool1) {
            break;
          }
          if (paramg.a(localjg)) {
            localz.add(localjg);
          }
          m++;
        } while (!bool1);
        localw.f();
      } while (bool2);
    } while (!bool1);
    return localz;
  }
  
  List g(g paramg)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    z localz = new z();
    m localm = paramg.w();
    label101:
    do
    {
      if (!localm.e()) {
        break;
      }
      d locald = localm.a();
      tb localtb = paramg.t(locald);
      int m = 0;
      do
      {
        do
        {
          if (m >= localtb.V()) {
            break label101;
          }
          ig localig = localtb.d(m);
          if (bool1) {
            break;
          }
          if (paramg.a(localig)) {
            localz.add(localig);
          }
          m++;
        } while (!bool1);
        localm.f();
      } while (bool2);
    } while (!bool1);
    return localz;
  }
  
  void a(List paramList1, List paramList2)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    Iterator localIterator = paramList1.iterator();
    Object localObject1;
    Object localObject2;
    z localz;
    Object localObject3;
    int m;
    label147:
    label152:
    label182:
    label212:
    label246:
    label249:
    do
    {
      do
      {
        do
        {
          do
          {
            do
            {
              do
              {
                if (!localIterator.hasNext()) {
                  break label249;
                }
                localObject1 = (jg)localIterator.next();
                localObject2 = ((jg)localObject1).a();
                localz = new z();
                localObject3 = ((jg)localObject1).hb();
                if (bool1) {
                  break label267;
                }
                m = 0;
                do
                {
                  do
                  {
                    if (m >= ((ld)localObject3).x()) {
                      break;
                    }
                    localz.add(((ld)localObject3).b(m).d());
                    m++;
                    if (bool2) {
                      break label152;
                    }
                    if (bool1) {
                      break label147;
                    }
                  } while (!bool1);
                } while (bool2);
                if (bool2) {
                  break label152;
                }
                if (!(localObject2 instanceof vb)) {
                  break;
                }
                a((jg)localObject1, localz);
              } while ((!bool2) && (!bool1));
              if (bool2) {
                break label182;
              }
              if (!(localObject2 instanceof se)) {
                break;
              }
              c((jg)localObject1, localz);
            } while ((!bool2) && (!bool1));
            if (bool2) {
              break label212;
            }
            if (!(localObject2 instanceof ce)) {
              break;
            }
            b((jg)localObject1, localz);
          } while ((!bool2) && (!bool1));
          if (bool2) {
            break label246;
          }
          if (!(localObject2 instanceof f.f_)) {
            break;
          }
          e((jg)localObject1, localz);
          if (bool2) {
            break label246;
          }
        } while (!bool1);
        f((jg)localObject1, localz);
      } while (!bool1);
    } while (bool2);
    localIterator = paramList2.iterator();
    label267:
    label425:
    label428:
    do
    {
      do
      {
        do
        {
          do
          {
            if (!localIterator.hasNext()) {
              break label428;
            }
            localObject1 = (ig)localIterator.next();
            localObject2 = ((ig)localObject1).a();
            localz = new z();
            localObject3 = ((ig)localObject1).nb();
            m = 0;
            do
            {
              do
              {
                if (m >= ((tb)localObject3).V()) {
                  break;
                }
                localz.add(((tb)localObject3).d(m).d());
                m++;
                if (bool2) {
                  break label391;
                }
                if (bool1) {
                  break label386;
                }
              } while (!bool1);
            } while (bool2);
            if (bool2) {
              break label391;
            }
            if (!(localObject2 instanceof bc)) {
              break;
            }
            a((ig)localObject1, localz);
          } while ((!bool2) && (!bool1));
          if (bool2) {
            break label425;
          }
          if (!(localObject2 instanceof re)) {
            break;
          }
          c((ig)localObject1, localz);
          if (bool2) {
            break label425;
          }
        } while (!bool1);
        e((ig)localObject1, localz);
      } while (!bool1);
    } while (bool2);
    label386:
    label391:
    return;
  }
  
  void a(g paramg, List paramList1, List paramList2)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    paramg.V();
    Iterator localIterator = paramList1.iterator();
    do
    {
      do
      {
        if (!localIterator.hasNext()) {
          break;
        }
        paramg.a((hg)localIterator.next(), true);
        if (bool2) {
          break label82;
        }
        if (bool1) {
          break label75;
        }
      } while (!bool1);
    } while (bool2);
    localIterator = paramList2.iterator();
    label75:
    label82:
    do
    {
      while (!bool1)
      {
        if (!localIterator.hasNext()) {
          break;
        }
        paramg.a((hg)localIterator.next(), true);
      }
    } while (bool2);
  }
  
  private static void a(jg paramjg, z paramz)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    ld localld = paramjg.hb();
    vb localvb = (vb)paramjg.a();
    HashSet localHashSet = new HashSet(17);
    int m = 0;
    do
    {
      if (m >= localld.x()) {
        break;
      }
      localObject1 = localld.b(m);
      if (!bool2)
      {
        if ((((jg)localObject1).e() instanceof Integer)) {
          localHashSet.add(((jg)localObject1).e());
        }
        m++;
      }
    } while (!bool1);
    z localz = localvb.a(paramjg, localld);
    Object localObject1 = localz.h();
    do
    {
      if (!((a.c.y)localObject1).e()) {
        break;
      }
      fc localfc = (fc)((a.c.y)localObject1).j();
      Object localObject2 = localfc.c();
      if (!bool2)
      {
        if (!localHashSet.contains(localObject2))
        {
          if (bool2) {
            continue;
          }
          if (c(localfc.j(), paramz))
          {
            paramjg.a(localObject2);
            return;
          }
        }
        ((a.c.y)localObject1).f();
      }
    } while (!bool1);
  }
  
  private static void b(jg paramjg, z paramz)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    ld localld = paramjg.hb();
    ce localce = (ce)paramjg.a();
    boolean[] arrayOfBoolean = new boolean[5];
    jd localjd = ce.a(paramjg);
    int m = 0;
    do
    {
      if (m >= localld.x()) {
        break;
      }
      localObject1 = localld.b(m);
      if (!bool2)
      {
        if (localjd == ce.a((jg)localObject1))
        {
          if (bool2) {
            continue;
          }
          if ((((jg)localObject1).e() instanceof ce.a_)) {
            arrayOfBoolean[ce.b(localObject1.e())] = true;
          }
        }
        m++;
      }
    } while (!bool1);
    z localz = localce.a(paramjg, localld);
    Object localObject1 = localz.h();
    do
    {
      if (!((a.c.y)localObject1).e()) {
        break;
      }
      fc localfc = (fc)((a.c.y)localObject1).j();
      Object localObject2 = localfc.c();
      if (!bool2)
      {
        if (arrayOfBoolean[ce.b(localObject2)] == 0)
        {
          if (bool2) {
            continue;
          }
          if (c(localfc.j(), paramz))
          {
            paramjg.a(localObject2);
            return;
          }
        }
        ((a.c.y)localObject1).f();
      }
    } while (!bool1);
  }
  
  private static void c(jg paramjg, z paramz)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    Object localObject1 = (se.a_)paramjg.e();
    a.d.o localo = new a.d.o(paramjg.d());
    if (!a(localo, paramz)) {
      localo.g(localo.l().a(), localo.l().b() + localo.h() + 5.0D);
    }
    while (bool2)
    {
      se.a_ locala_1 = (se.a_)paramjg.d(localo);
      se.a_ locala_2 = (se.a_)paramjg.e();
      paramjg.a(locala_1);
      Object localObject2;
      if (!bool2) {
        if (locala_2.e() != 0.0D)
        {
          localObject2 = ((se)paramjg.a()).a(((se.a_)localObject1).a(), locala_1.b(), ((se.a_)localObject1).c(), locala_1.d(), ((se.a_)localObject1).e(), locala_1.f(), locala_1.g(), locala_1.h());
          paramjg.a(localObject2);
          locala_1 = (se.a_)localObject2;
        }
      }
      if (!bool2)
      {
        if (locala_2.f() != 0.0D)
        {
          localObject2 = ((se)paramjg.a()).a(locala_1.a(), ((se.a_)localObject1).b(), locala_1.c(), ((se.a_)localObject1).d(), locala_1.e(), ((se.a_)localObject1).f() + localo.h() + 5.0D, locala_1.g(), locala_1.h());
          paramjg.a(localObject2);
          locala_1 = (se.a_)localObject2;
        }
        localObject1 = locala_1;
      }
      if (!bool1) {
        break;
      }
    }
  }
  
  private static void e(jg paramjg, z paramz)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    do
    {
      a.d.o localo = new a.d.o(paramjg.d());
      while (!bool1)
      {
        if (a(localo, paramz)) {
          break;
        }
        localo.g(localo.l().a() + localo.g() + 5.0D, localo.l().b());
        paramjg.a(paramjg.d(localo));
      }
    } while (bool2);
  }
  
  private static void f(jg paramjg, z paramz)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    do
    {
      a.d.o localo = new a.d.o(paramjg.d());
      while (!bool1)
      {
        if (a(localo, paramz)) {
          break;
        }
        localo.g(localo.l().a(), localo.l().b() + localo.h() + 5.0D);
        paramjg.a(paramjg.d(localo));
      }
    } while (bool2);
  }
  
  private static void a(ig paramig, z paramz)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    do
    {
      a.d.o localo = new a.d.o(paramig.d());
      while (!bool1)
      {
        if (a(localo, paramz)) {
          break;
        }
        localo.g(localo.l().a(), localo.l().b() + localo.h() + 5.0D);
        paramig.a(paramig.d(localo));
      }
    } while (bool2);
  }
  
  private static void c(ig paramig, z paramz)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    tb localtb = paramig.nb();
    re localre = (re)paramig.a();
    re.a_ locala_1 = (re.a_)paramig.e();
    int m = localtb.a() + 1;
    Object localObject1 = locala_1;
    int n = 0;
    int i1 = 1;
    label426:
    label457:
    do
    {
      if (n != 0) {
        break;
      }
      int i3 = ((re.a_)localObject1).a();
      if (!bool2) {
        if (i1 != 0)
        {
          if (!bool2) {
            if (((re.a_)localObject1).b() + 0.1D > b(paramig))
            {
              i2 = i3 + 1;
              if ((bool2) || ((i2 < m) && (i2 != 0)))
              {
                localObject2 = (ig)paramig.clone();
                ((ig)localObject2).a(new re(), new re.a_(i2, ((re.a_)localObject1).b(), ((re.a_)localObject1).c(), ((re.a_)localObject1).d(), ((re.a_)localObject1).e(), ((re.a_)localObject1).f()));
                localtb.a((ig)localObject2);
                d = a((ig)localObject2);
                localtb.b((ig)localObject2);
                if (!bool2) {
                  if (!bool1) {
                    break label426;
                  }
                }
              }
              else
              {
                d = locala_1.b();
                if (bool2) {
                  break label457;
                }
                i2 = locala_1.a();
                i1 = 0;
              }
              if (!bool1) {
                break label426;
              }
            }
          }
          i2 = i3;
          d = ((re.a_)localObject1).b() + 0.1D;
          if ((!bool2) && (!bool1)) {
            break label426;
          }
        }
      }
      if (!bool2) {
        if (((re.a_)localObject1).b() - 0.1D < a(paramig))
        {
          i2 = i3 - 1;
          if ((bool2) || ((i2 >= -m) && (i2 != -1)))
          {
            localObject2 = (ig)paramig.clone();
            ((ig)localObject2).a(new re(), new re.a_(i2, ((re.a_)localObject1).b(), ((re.a_)localObject1).c(), ((re.a_)localObject1).d(), ((re.a_)localObject1).e(), ((re.a_)localObject1).f()));
            localtb.a((ig)localObject2);
            d = b((ig)localObject2);
            localtb.b((ig)localObject2);
            if (!bool2) {
              if (!bool1) {
                break label426;
              }
            }
          }
          else
          {
            d = locala_1.b();
            if (bool2) {
              break label457;
            }
            i2 = locala_1.a();
            n = 1;
          }
          if (!bool1) {
            break label426;
          }
        }
      }
      int i2 = i3;
      double d = ((re.a_)localObject1).b() - 0.1D;
      re.a_ locala_2 = new re.a_(i2, d, ((re.a_)localObject1).c(), ((re.a_)localObject1).d(), ((re.a_)localObject1).e(), ((re.a_)localObject1).f());
      Object localObject2 = localre.a(paramig.d().f(), localtb, localtb.h(), localtb.g(), locala_2);
      paramig.a(locala_2);
      if (!bool2)
      {
        if (a((a.d.o)localObject2, paramz)) {
          n = 1;
        }
        localObject1 = locala_2;
      }
    } while (!bool1);
  }
  
  private static void e(ig paramig, z paramz)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    tb localtb = paramig.nb();
    xb localxb = paramig.a();
    a.d.w localw = paramig.d().l();
    double d1 = 1.7976931348623157E+308D;
    Object localObject = null;
    z localz = localxb.a(paramig, localtb, localtb.h(), localtb.g());
    a.c.y localy = localz.h();
    if (localy.e()) {}
    label160:
    while (bool2)
    {
      fc localfc = (fc)localy.j();
      a.d.o localo = localfc.j();
      if ((!bool2) && (bool1)) {
        return;
      }
      if (!bool2)
      {
        if (a(localo, paramz))
        {
          double d2 = a.d.w.a(localw, localfc.j().l());
          if (bool2) {
            break label160;
          }
          if (d2 < d1)
          {
            d1 = d2;
            localObject = localfc;
          }
        }
        localy.f();
      }
      if (!bool1) {
        break;
      }
    }
    if (localObject != null) {
      paramig.a(localObject.c());
    }
  }
  
  private static double a(ig paramig)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    double d = 1.0D;
    a.d.y localy = paramig.mb().n(paramig.lb());
    re.a_ locala_1 = (re.a_)paramig.e();
    int m = locala_1.a();
    if (!bool2) {}
    m = m < 0 ? localy.j() - 1 + m : m;
    xb localxb = paramig.a();
    tb localtb = paramig.nb();
    z localz = localxb.a(paramig, localtb, localtb.h(), localtb.g());
    a.c.y localy1 = localz.h();
    do
    {
      if (!localy1.e()) {
        break;
      }
      re.a_ locala_2 = (re.a_)((fc)localy1.j()).c();
      if (!bool2) {}
      int n = locala_2.a() < 0 ? localy.j() - 1 + locala_2.a() : locala_2.a();
      if (!bool2)
      {
        if (n == m)
        {
          if (bool2) {
            continue;
          }
          if (locala_2.e() == locala_1.e()) {
            d = Math.min(d, locala_2.b());
          }
        }
        localy1.f();
      }
    } while (!bool1);
    return Math.max(d, 0.0D);
  }
  
  private static double b(ig paramig)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    double d = 0.0D;
    a.d.y localy = paramig.mb().n(paramig.lb());
    xb localxb = paramig.a();
    re.a_ locala_1 = (re.a_)paramig.e();
    int m = locala_1.a();
    if (!bool2) {}
    m = m < 0 ? localy.j() - 1 + m : m;
    tb localtb = paramig.nb();
    z localz = localxb.a(paramig, localtb, localtb.h(), localtb.g());
    a.c.y localy1 = localz.h();
    do
    {
      if (!localy1.e()) {
        break;
      }
      re.a_ locala_2 = (re.a_)((fc)localy1.j()).c();
      if (!bool2) {}
      int n = locala_2.a() < 0 ? localy.j() - 1 + locala_2.a() : locala_2.a();
      if (!bool2)
      {
        if (n == m)
        {
          if (bool2) {
            continue;
          }
          if (locala_2.e() == locala_1.e()) {
            d = Math.max(d, locala_2.b());
          }
        }
        localy1.f();
      }
    } while (!bool1);
    return Math.min(d, 1.0D);
  }
  
  private static boolean a(a.d.o paramo, z paramz)
  {
    boolean bool3 = ld.E;
    boolean bool2 = ld.D;
    boolean bool1 = true;
    a.c.y localy = paramz.h();
    if (localy.e())
    {
      if (bool2) {
        break label80;
      }
      if (bool1) {
        if (bool3) {}
      }
    }
    while (bool3)
    {
      bool1 = !a(paramo, (a.d.o)localy.j(), 0.0D);
      localy.f();
      if (!bool2) {
        break;
      }
    }
    label80:
    return bool1;
  }
  
  private static boolean c(a.d.o paramo, z paramz)
  {
    boolean bool3 = ld.E;
    boolean bool2 = ld.D;
    boolean bool1 = true;
    a.c.y localy = paramz.h();
    if (localy.e())
    {
      if (bool2) {
        break label80;
      }
      if (bool1) {
        if (bool3) {}
      }
    }
    while (bool3)
    {
      bool1 = !a.d.o.a((a.d.o)localy.j(), paramo, 0.0D);
      localy.f();
      if (!bool2) {
        break;
      }
    }
    label80:
    return bool1;
  }
  
  private static boolean a(a.d.o paramo1, a.d.o paramo2, double paramDouble)
  {
    boolean bool = ld.E;
    a.d.w[] arrayOfw = a.d.o.a(paramo2);
    if (!bool) {
      if (!a.d.o.a(paramo1, new a.d.n(arrayOfw[0], arrayOfw[1]), paramDouble))
      {
        if (bool) {
          break label124;
        }
        if (!a.d.o.a(paramo1, new a.d.n(arrayOfw[1], arrayOfw[2]), paramDouble))
        {
          if (bool) {
            break label124;
          }
          if (!a.d.o.a(paramo1, new a.d.n(arrayOfw[2], arrayOfw[3]), paramDouble)) {
            if (bool) {
              break label124;
            }
          }
        }
      }
    }
    label124:
    return a.d.o.a(paramo1, new a.d.n(arrayOfw[3], arrayOfw[0]), paramDouble);
  }
  
  private static class b_
    implements x.a_
  {
    private x.a_ a;
    private Map b;
    private Map c;
    private Map d;
    private ab e;
    
    b_(x.a_ parama_, ab paramab, Map paramMap1, Map paramMap2, Map paramMap3)
    {
      this.a = parama_;
      this.b = paramMap1;
      this.c = paramMap2;
      this.d = paramMap3;
      this.e = paramab;
    }
    
    public d a(q paramq, a.c.e parame1, a.c.e parame2, d paramd)
    {
      d locald = this.a.a(paramq, parame1, parame2, paramd);
      this.d.put(locald, paramd);
      this.e.add(locald);
      return locald;
    }
    
    public a.c.e a(q paramq, a.c.e parame)
    {
      a.c.e locale = this.a.a(paramq, parame);
      this.b.put(locale, parame);
      this.c.put(parame, locale);
      return locale;
    }
    
    public q a()
    {
      return this.a.a();
    }
    
    public void a(q paramq1, q paramq2, Map paramMap1, Map paramMap2)
    {
      this.a.a(paramq1, paramq2, paramMap1, paramMap2);
    }
    
    public void a(q paramq1, q paramq2)
    {
      this.a.a(paramq1, paramq2);
    }
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.j.wc

 * JD-Core Version:    0.7.0.1

 */